package com.gisquest.cloud.entity.page;

import java.io.Serializable;
import java.util.List;

/**
 * @Author guowei
 * @Date 2020/6/18 8:30
 * @Description:分页对象
 **/
public class Pagination<T> implements Serializable {

  private static final long serialVersionUID = 1L;
  private List<T> items;
  private int pageNum;
  private int pageSize;
  private int pages;
  private long total;

  public List<T> getItems() {
    return this.items;
  }

  public void setItems(List<T> items) {
    this.items = items;
  }

  public int getPageNum() {
    return this.pageNum == 0 ? 1 : this.pageNum;
  }

  public void setPageNum(int pageNum) {
    this.pageNum = pageNum;
  }

  public int getPageSize() {
    return this.pageSize == 0 ? 25 : this.pageSize;
  }

  public void setPageSize(int pageSize) {
    this.pageSize = pageSize;
  }

  public int getPages() {
    return this.pages;
  }


  public void setPages(int pages) {
    this.pages = pages;
  }

  public long getTotal() {
    return this.total;
  }

  public void setTotal(long total) {
    this.total = total;
  }

}
